package com.hongyun.tms.common.dto.mwork;

import com.alibaba.excel.annotation.ExcelProperty;
import com.hongyun.tms.common.annotation.Dict;
import com.hongyun.tms.infra.excel.converter.dict.DictConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 作业项目 导入
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
public class MWorkItemImportDto implements Serializable {

    @ApiModelProperty(value = "作业项目")
    @NotBlank(message = "作业项目不能为空")
    @Size(max = 20, message = "作业项目不能超过20个字符")
    @ExcelProperty(value = "作业项目", index = 0)
    private String workItem;

    @ApiModelProperty(value = "作业类型代码，字典")
    @NotBlank(message = "作业类型代码不能为空")
    @Dict(code = "WORK_TYPE", fieldName = "workTypeName")
    @ExcelProperty(value = "作业类型", converter = DictConverter.class, index = 1)
    private String workTypeCode;
}

